package com.salt.patterns.factory;

/**
 * 微信消息下发工厂
 *
 * @author KuangHaiBo
 * @date 2021/4/5 20:21
 */
public class SendWeChatMegFactory {
    /**
     * 构建
     *
     * @param way
     * @return
     */
    public WeChatNoticeSender build(String way) {
        switch (way) {
            case "sub":
                return new WeChatSendSubscribe();
            case "unite":
                return new WeChatSendUnite();
            default:
                return null;
        }
    }
}
